//
//  ServiceVC.swift
//  xiaoleservice
//
//  Created by Wenzhe Fan on 2019/6/1.
//  Copyright © 2019年 Wenzhe Fan. All rights reserved.
//

import UIKit

class ServiceVC: UIViewController {
    @IBOutlet weak var 信源: UIButton!
    @IBOutlet weak var 服务: UIButton!
    @IBOutlet weak var 建议: UIButton!
    @IBOutlet weak var 选择: UIButton!
    @IBOutlet weak var tipLB: UILabel!
    var type:LargeType = .信源
    override func viewDidLoad() {
        super.viewDidLoad()
        self.信源.tag = LargeType.信源.rawValue
        self.服务.tag = LargeType.服务.rawValue
        self.建议.tag = LargeType.建议.rawValue
        self.选择.tag = LargeType.选择.rawValue
        // Do any additional setup after loading the view.
    }
    
    @IBAction func cancelHander(_ sender: UIButton) {
        
    }
    @objc func p() {
        
    }
    
    @IBAction func touchDwonHande(_ sender: UIButton) {
        type = LargeType(rawValue: sender.tag)!
        switch type {
        case .信源:
            let infoVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "InfoNavi") as! UINavigationController
//            self.present(infoVC, animated: true) { }
        case .服务:
            let infoVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "serviceNavi") as! UINavigationController
//            self.present(infoVC, animated: true) { }
        case .建议:
            let infoVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "seguestNavi") as! UINavigationController
//            self.present(infoVC, animated: true) { }
        case .选择:
//            let infoVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "selectNavi") as! UINavigationController
//            self.present(infoVC, animated: true) { }
            self.dismiss(animated: true, completion: nil)
        }
        
        
    }
    
    
    @IBAction func touchDwonRepeat(_ sender: UIButton) {
        tipLB.isHidden = false
        tipLB.text = "信源声明\n\n1.小乐服务中的所有信息都是开源的   \n\n2.每一条开源信息都会注明作者和开源协议的\n\n3.每一条信息都是可以随意观看的    "
        DispatchQueue.main.asyncAfter(deadline:.now()+5) {
            self.tipLB.isHidden = true
        }
    }
    
    
    @IBAction func touchDragEnter(_ sender: UIButton) {
        
    }
    
    @IBAction func touchDragExit(_ sender: UIButton) {
        
    }
    
    
    @IBAction func touchDragInSider(_ sender: UIButton) {
        
    }
    
    @IBAction func touchDragOutSider(_ sender: UIButton) {
        
    }
    
    
    @IBAction func touchupInSider(_ sender: UIButton) {
        
    }
    
    
    @IBAction func touchdownOutSider(_ sender: UIButton) {
        
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
